<template>
  <el-form
    :model="formData"
    @submit.native.prevent="handleSubmit"
  >
    <!-- 示例表单项 -->
    <el-form-item label="用户名">
      <el-input v-model="formData.username"></el-input>
    </el-form-item>
    <!-- 更多表单项... -->
    <el-button
      type="primary"
      native-type="submit"
    >提交</el-button>
  </el-form>
</template>
<script>
export default {
  props: ['formData'],
  methods: {
    handleSubmit() {
      this.$emit('submit', this.formData);
    }
  }
}
</script>
<style lang="scss" scoped>
</style>